home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.coast.net!torn!nott!uottawa!ctran
- From: ctran@csi.uottawa.ca (Charles Tran)
- Newsgroups: comp.lang.c
- Subject: Handling complex numbers...
- Date: 5 Mar 1996 18:26:43 GMT
- Organization: University of Ottawa
- Distribution: world
- Message-ID: <4hi113$2i8k@mercury.cc.uottawa.ca>
- NNTP-Posting-Host: ai0.csi.uottawa.ca
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
-
- Dear fellow netters,
-
- Can someone kindly explain to me how to represent complex numbers in C?
- I am writing a numerical method program to calculate the area under
- a curve using Simpson's Rule. The problem that I face right now is
- the representation of "i" (where i^2 = -1) in my C program.
-
- Here's a simple example of what I mean:
-
- _b
- |
- | exp(ix) dx
- _|
- a
-
-
- How do I implement this function exp(ix)?
-
- I'm grateful for your help.
-
- Charles Tran
- --
- Charles
-